home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-05-25 | 2.5 KB | 62 lines | [TEXT/GEOL] |
- Item 2461229 25-May-90 11:18PDT
-
- From: MADA2 MacApp Dev Assoc, Curtis Faith,IVC
-
- To: D4695 Skywalker Sys, Scott Collins,PRT
-
- cc: MACAPP.TECH$ MacApp Technical
-
- Sub: Dismisser Disagreement
-
- Scott,
- You State:
-
- "Dismissers don't 'put away' dialogs. They never have (either modal or
- modeless), any more than choosing the quit item call ExitToShell. Instead quit
- sets a semaphore that says 'all done, you clean up and do whatever you have
- to'.
- PoseModally uses its semaphore (fDismissed) to note that user has finished
- input, it can then do any final validation and finally put the dialog away.
- There are many schools of thought on modeless dialogs, whether they can have
- buttons that make them go away or if only the close box can do that. There is
- no OK button on a MacWrite document."
-
- I am going to DISAGREE with you on this one.
-
- In every standard MacApp application, Choosing the quit menu item does the
- following:
-
- 1) A TQuitCommand is created and returned up the call chain.
- 2) The TQuitCommand's Doit method is called which in turn:
- a) CALLS TAPPLICATION.CLOSE and
- b) sets gAppDone to TRUE
- 3) gAppDone being TRUE results in the termination of TApplication.MainEventLoop
- 4) MainEventLoop terminates and control goes back to TApplication.Run.
- 5) TApplication.Run calls some Cleanup stuff.
- 6) The program falls out of its main routine, resulting in a call to
- ExitToShell.
-
-
- You Say: "quit sets a semaphore that says 'all done, you clean up and do
- whatever you have to'".
-
- This is partially True, Quit directly calls TApplication.Close and Quit is
- sending this semaphore to MacApp! MacApp picks it up and takes care of this
- without any intervention on my part.
-
- In saying there was a bug my intent is to point out that MacApp should
- automatically handle the removal of windows that are closed via a dismisser, in
- the same way it automatically handles going from a quit command to ExitToShell.
-
- Now whether there should be a dismisser besides the close bow in a modeless
- dialog that is another matter. I tend to think that this is useful at times,
- mostly so that users can have there trusy "Cancel" button. If it looks like a
- dialog my users expect a cancel button.
-
- Thanks for the modification to RemoveAndFree, funny how I was pointing out how
- free calls fSuperView.RemoveSubVIew(SELF) but then forgot that when I replaced
- the functionality of FreeAll.
-
- - Curtis
-
-